package com.chainyoung.component_tmperson.ui.mvp.model;

import com.chainyoung.common.appcommon.entity.CommonList;
import com.chainyoung.common.di.scope.ActivityScope;
import com.chainyoung.common.di.scope.FragmentScope;
import com.chainyoung.common.integration.IRepositoryManager;
import com.chainyoung.common.mvp.BaseModel;
import com.chainyoung.common.utils.RxUtils;
import com.chainyoung.component_tmperson.api.PersonService;
import com.chainyoung.component_tmperson.entity.Purse;
import com.chainyoung.component_tmperson.entity.RechargeRecord;
import com.chainyoung.component_tmperson.ui.mvp.contract.RechargeRecordContract;
import com.chainyoung.component_tmperson.ui.mvp.contract.WalletContact;

import java.util.TreeMap;

import javax.inject.Inject;

import io.reactivex.Flowable;


@ActivityScope
public class RechargeRecordModel extends BaseModel implements RechargeRecordContract.Model {

    @Inject
    RechargeRecordModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);

    }





    @Override
    public Flowable<CommonList<RechargeRecord>> getTransferRecord(TreeMap<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(PersonService.class)
                .getTransferRecord(map)
                .compose(RxUtils.<CommonList<RechargeRecord>>handleResult());
    }


}